﻿using BCEntity.TMS.MoveHouseConfig.MoveHouseConfig;
using BCEntity.TMS.MoveHouseConfig.MoveHouseSpecificationServiceConfig;
using BCEntity.TMS.MoveHouseConfig.MoveHouseSpecificationServiceConfigOverWrite;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.TMS.MoveHouseConfig.MoveHouseSpecificationServiceConfig
{
    public interface IMoveHouseSpecificationServiceConfigData
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<MoveHouseSpecificationServiceConfigEntity> InsertAsync(MoveHouseSpecificationServiceConfigEntity entity);
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<MoveHouseSpecificationServiceConfigEntity> UpdateAysnc(MoveHouseSpecificationServiceConfigEntity entity);
        /// <summary>
        /// 添加列表
        /// </summary>
        /// <param name="entities"></param>
        /// <returns></returns>
        Task<int> InsertAllAsync(IEnumerable<MoveHouseSpecificationServiceConfigEntity> entities);
        /// <summary>
        /// 获取单个信息
        /// </summary>
        /// <param name="moveHouseSpecificationServiceConfigId"></param>
        /// <returns></returns>
        Task<MoveHouseSpecificationServiceConfigEntity> GetSingle(long moveHouseSpecificationServiceConfigId);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="moveHouseSpecificationConfigId"></param>
        /// <returns></returns>
        Task<int> DeleteBySpecificationConfigId(long moveHouseSpecificationConfigId);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="moveHouseSpecificationServiceConfigId"></param>
        /// <returns></returns>
        Task<int> DeleteAsync(long moveHouseSpecificationServiceConfigId);
        /// <summary>
        /// 获取规格服务
        /// </summary>
        /// <param name="moveHouseSpecificationConfigId"></param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseSpecificationServiceConfigEntity>> GetList(long moveHouseSpecificationConfigId, bool? isEnable);
        /// <summary>
        /// 规格中是否存在当前服务
        /// </summary>
        /// <param name="moveHouseServiceId">搬家服务id</param>
        /// <returns></returns>
        Task<int> IsExistService(long moveHouseServiceId);

        /// <summary>
        /// 获取所有代理商价格
        /// </summary>
        /// <param name="agentRecordId"></param>
        /// <param name="provinceCode"></param>
        /// <param name="cityCode"></param>
        /// <param name="countyCode"></param>
        /// <param name="enabled"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<MoveHouseSpecificationServiceConfigOverWriteViewEntity>, int)> GetAllAgentPriceList(long agentRecordId, string provinceCode,
            string cityCode, string countyCode, bool? enabled, int pageIndex, int pageSize);
        /// <summary>
        /// 获取总部价格
        /// </summary>
        /// <param name="enabled"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<MoveHouseSpecificationServiceConfigViewEntity>, int)> GetAllPriceQuery(bool? enabled, int pageIndex,int pageSize);

        /// <summary>
        /// 获取当前分类中的价格设置
        /// </summary>
        /// <param name="moveHouseConfigId">搬家配置id</param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseSpecificationServiceConfigViewEntity>> GetListByMoveHouseConfigId(long moveHouseConfigId,bool? enabled);
        /// <summary>
        /// 获取最低的可用价格
        /// </summary>
        /// <param name="isEnable"></param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseMinPriceEntity>> GetMinPrice(bool? isEnable);

        /// <summary>
        /// 获取规格服务
        /// </summary>
        /// <param name="enabled"></param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseSpecificationServiceConfigViewEntity>> GetList();
    }
}
